package com.itbaizhan.pojo;

import java.util.ArrayList;
import java.util.List;

public class Users {
    private int userid;
    private String username;
    private int userage;
    /*Users表与orders表（order_id）关联,所以在Orders表中定义User属性，
    以Orders表的user_id为引，查询Users表里的信息。
    orders表与items表关联，所以在items类中定义Order集合，在Order类中定义itemsw集合*/
    //创建与Orders 的关联关系  一个用户可能有多个订单
    //在这里直接new,方便以后操作
    List<Orders> orders = new ArrayList<>();

    public List<Orders> getOrders() {
        return orders;
    }

    public void setOrders(List<Orders> orders) {
        this.orders = orders;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getUserage() {
        return userage;
    }

    public void setUserage(int userage) {
        this.userage = userage;
    }

    @Override
    public String toString() {
        return "Users{" +
                "userid=" + userid +
                ", username='" + username + '\'' +
                ", userage=" + userage +
                '}';
    }
}
